<h3>Member Management</h3>
<form name="search" >
<div>
	Search (Name/Email)
	<input type="text" name="search" value="<?=@$_GET['search'];?>" size="60">
	<input type="submit" name="submit" value="Search">
	<!--<input type="button" name="btn_export_member" value="Export" onclick="window.open('admin_member/export');">-->
	<? if(permission($menu_id, 'canadd')!=''){ ?><input type="button" value="Add New" onclick="window.location='admin_member/form<?=$url;?>';"><? } ?>	
</div>
</form>
<div id="paging" class="pagination">
<?php echo $pagination;?>
</div>

	<table class="tblist2">
		<tr class="head">
			<th></th>
			<th>Users Type</th>
			<th>Name</th>
			<th>Address</th>
			<th>Email</th>
			<th>Register Date</th>
			<th>Manage</th>
		</tr>
		<?php 
		  $rowStyle = '';
		  $page = (isset($_GET['page']))? $_GET['page']:1;
		  $i=(isset($_GET['page']))? (($_GET['page'] -1)* 10)+1:1;
		  foreach($result as $row):
		?>  
		<tr  <? if($rowStyle =='')$rowStyle = 'class="odd"';else $rowStyle = "";echo $rowStyle;?> >
		  <td><?=$i;?></td>
		  <td style="cursor: pointer;" onclick="window.location='<?=$urlpage;?>/form/<?=$row['id'];?><?=$url;?>'">
		  	<? if($row['isadmin']==1)echo "Admin"; else echo "User";?> 
		  </td>		  
		  <td style="cursor: pointer;" onclick="window.location='<?=$urlpage;?>/form/<?=$row['id'];?><?=$url;?>'">
		  	<?=$row['name'];?> 
		  </td>		  
		  <td style="cursor: pointer;" align="left" onclick="window.location='<?=$urlpage;?>/form/<?=$row['id'];?><?=$url;?>'"><?=GetMemberAddress($row['id'],'en');?></td>
		  <td style="cursor: pointer;" align="center" onclick="window.location='<?=$urlpage;?>/form/<?=$row['id'];?><?=$url;?>'"><?=$row['email'];?></td>
		  <td style="cursor: pointer;" align="center" onclick="window.location='<?=$urlpage;?>/form/<?=$row['id'];?><?=$url;?>'"><?=$row['registerdate'];?></td>		  
		  <td>
		  	<? if(permission($menu_id, 'candelete')!=''){ ?>
		  	<a href="<?=$urlpage;?>/delete/<?php echo $row['id']?><?=$url;?>" style="text-decoration:none;" onclick="return confirm('<?php echo NOTICE_CONFIRM_DELETE?>')"><input type="button" class="btn_delete" /></a>
		  	<? } ?>  	  	
		  </td>
		  </tr>
		<tr>
		<? 
				$i++;
		  		endforeach; 
?>		
	</table>
